package com.cmower.mkyong;

/**
 * @author 沉默王二，一枚有趣的程序员
 */
public class FibonacciExampleFor {
    public static void main(String[] args) {
        int n1 = 0, n2 = 1, n3;
        System.out.print(n1 + " " + n2);

        for (int i = 2; i < 10; ++i) {
            n3 = n1 + n2;
            System.out.print(" " + n3);
            n1 = n2;
            n2 = n3;
        }
    }
}
